package org.dtrd.modules.content.articles.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.dtrd.modules.content.articles.entity.bean.ArticleInfo;
import org.dtrd.modules.content.articles.entity.po.DtrdExtEmsContent;

import java.util.List;

public interface DtrdExtEmsContentMapper extends BaseMapper<DtrdExtEmsContent> {

    ArticleInfo selectArticleInfoByContentId(@Param("contentId") Integer contentId);

    /**
     * 清空文章关联的分类
     *
     * @param classId
     */
    void clearArticleClass(@Param("classId") Integer classId);

    /**
     * 查询分类推荐文章
     * 查询语句限定取两类
     *
     * @param category
     * @param limitSize
     * @return
     */
    List<ArticleInfo> getRecommendArticleList(@Param("category") int category, @Param("limitSize") int limitSize);
}